<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        const arr = [5,3,2,8,3,11,18,2,6,5,10,12,14,7]
        // 大小值
        Math.min(...arr)
        Math.max(...arr)

        // 平均值,求和
        var sum = 0;
        var average = 0;
        for(var i = 0; i < arr.length; i++){
            sum += arr[i]     //求和
            average = sum/arr.length     //平均值
        }
        
        // 去重
        const set = new Set(arr);
        const list = Array.from(set);

        // 降序排序
        arr.sort(function(a,b){return a-b});
    
        console.log(Math.min(...arr),Math.max(...arr),sum,average,list,arr);    //最小值,最大值,和,平均值 ,去重

        
        
    </script>
</head>
<body>
    
</body>
</html>